package mediator;

/**
 * @author wcj
 * @Date 2021/7/10 23:39
 * @Version 1.0
 */
public class UnitedNation extends Mediator {

    private America america;
    private Iraq iraq;

    public America getAmerica() {
        return america;
    }

    public void setAmerica(America america) {
        this.america = america;
    }

    public Iraq getIraq() {
        return iraq;
    }

    public void setIraq(Iraq iraq) {
        this.iraq = iraq;
    }

    @Override
    public void declare(String message, Country country) {
        if (country instanceof America) {
            iraq.getMessage(message);
        }
        if (country instanceof Iraq) {
            america.getMessage(message);
        }
    }
}
